import os
import yaml

# sample文件夹的路径
project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
f = open(os.path.join(project_path, "config", "change.yaml"), encoding='utf-8')
# 变更列表
change_list = yaml.load(f.read(), Loader=yaml.FullLoader)
# 训练数据的路径
train_data_path =os.path.join(project_path, 'kpi_data', 'train')
# 测试数据路径
test_data_path = os.path.join(project_path, 'kpi_data', 'test')
# 画图字体
font_dict = {'size': 110}
# 训练次数
epochs = 50
# spot参数
spot_q = 1e-2
spot_level = 0.90
# bagel参数
bagel_window_size = 30
# 中位差参数
median_diff_threhold = {
    'disk_read_rate': 1e7,
    'disk_write_rate': 1e6,
    'load': 2,
    'mem_usage': 0.2,
    'tcp_recv_drop': 1e-9,
    'tcp_recv_err': 1e-9,
    'tcp_rs': 2e-6,
    'tcp_trans_drop': 1e-9,
    'tcp_trans_err': 1e-9,
    '200': 50,
    '302': 50,
    '304': 50,
    '503': 50,
    'error_rate': 0.1,
    'istio_request_duration_milliseconds_sum': 3,
    'istio_requests_total': 100
}
